***********************************************
* Rwanda provider study
***********************************************

***********************************************
* Contents
***********************************************

	* (0.0) Set up
	* (0.1) Regressions
	
***********************************************
* (0.0) Set up
***********************************************
	
	clear all
	clear matrix
	set mem 250m
	set matsize 1000
	set more off
	tempfile temp1
	pause on
    eststo clear
	
	cd "C:\Users\Diana\Documents\DHS_rwanda\do_files"

	* Define file globals
	do rwanda_global_define.do

    cap log close
    log using `"$d_out\logs\logresults_`c(current_date)'.txt"', text replace

***********************************************
* (0.1) Regressions
***********************************************

use "$d_interm\staff", clear
merge m:1 facil using "$r_fac_controls", nogen

rwanda_regressions_cluster hr_worked, savename("hours") title("Health worker interviews") indcont("h_*") addnote("Additional individual level controls included.")

bysort facil: egen avg_hr=mean(hr_worked)
bysort facil: keep if _n==1
keep facil avg_hr
save "$d_interm\avg_hr", replace

